﻿@model MvcPaging.IPagedList<PagingSorting.Web.Models.People>
@using MvcPaging

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<table class="grid">
<thead>
    <tr>
        <th>@Html.ActionLink("Id", "Index", Model)</th>
        <th>@Html.ActionLink("Username", "Index", Model)</th>
        <th>@Html.ActionLink("Age", "Index", Model)</th>
    </tr>
</thead>
<tbody>
    @foreach (var i in Model) { 
        <tr>
            <td>@i.Id</td>
            <td>@i.Username</td>
            <td>@i.Age</td>
        </tr>
    }
</tbody>
</table>

<div class="pager">
	@Html.Pager(Model.PageSize, Model.PageNumber, Model.TotalItemCount, Model.SortBy, Model.SortDescending)
</div>
